package toko.domain;

import java.math.BigDecimal;

public class PenjualanDetail {
	private Integer id;
	private Buku buku;
	private Integer quantity;
	private Penjualan penjualan;
	
	public BigDecimal subtotal(){
		return buku.getHarga().multiply(new BigDecimal(quantity));
	}
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Penjualan getPenjualan() {
		return penjualan;
	}

	public void setPenjualan(Penjualan penjualan) {
		this.penjualan = penjualan;
	}

	public Buku getBuku() {
		return buku;
	}
	public void setBuku(Buku buku) {
		this.buku = buku;
	}
	public Integer getQuantity() {
		return quantity;
	}
	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}
	
	
}
